﻿// ***********************************************************************
// Assembly         : MVC4Portal
// Author           : Lolo
// Created          : 06-29-2013
//
// Last Modified By : Lolo
// Last Modified On : 11-10-2013
// ***********************************************************************
// <copyright file="DynaContentDynamic.cs" company="">
//     Copyright (c) . All rights reserved.
// </copyright>
// <summary></summary>
// ***********************************************************************
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using InnovaApp.Layers.ResourcesLayer.Properties;
using InnovaApp.Portals.MVC4Portal.Models.ClientFilesGenerationModels;
using System.Globalization;
using System.Threading;

namespace InnovaApp.Portals.MVC4Portal.Controllers.ClientFilesGenerationControllers
{
    /// <summary>
    /// Class ScriptsGController.
    /// </summary>
    public partial class ScriptsGController : _ClientFilesGenerationControllers_Base
    {
        /// <summary>
        /// GET: /ScriptsG/DynaContentDynamic.js
        /// </summary>
        /// <returns>ActionResult.</returns>
        public ActionResult DynaContentDynamic(string language)
        {
            LocalizeDynamicScripts(language);
            Response.ContentType = "text/javascript";
            toReturn.Variables.Add("ControllerName", "DyanContent");
            toReturn.Variables.Add("StructurePageEditorTitle", Resources.View_DynaContent_StructurePageEditorTitle);
            toReturn.Variables.Add("EditModeButtonTitle_Edit", Resources.View_DynaContent_EditModeButtonTitle_Edit);
            toReturn.Variables.Add("EditModeButtonTitle_Preview", Resources.View_DynaContent_EditModeButtonTitle_Preview);
            toReturn.Variables.Add("cap_AddMenuItem", Resources.View_DynaContent_Cap_AddMenuItem);
            toReturn.Variables.Add("cap_EditMenuItem", Resources.View_DynaContent_Cap_EditMenuItem);
            toReturn.Variables.Add("cap_RemoveMenuItemConfirmTitle", Resources.View_DynaContent_Cap_RemoveMenuItemConfirmTitle);
            toReturn.Variables.Add("cap_RemoveMenuItemConfirmMessage", Resources.View_DynaContent_Cap_RemoveMenuItemConfirmMessage);
            toReturn.Variables.Add("cap_RemoveMenuItemConfirmOkButtonTitle", Resources.View_DynaContent_Cap_RemoveMenuItemConfirmOkButtonTitle);
            toReturn.Variables.Add("cap_RemoveMenuItemConfirmCancelButtonTitle", Resources.View_DynaContent_Cap_RemoveMenuItemConfirmCancelButtonTitle);
            toReturn.Variables.Add("cap_ToggleMenuActivationTitle", Resources.View_DynaContent_Cap_ToggleMenuActivationTitle);
            toReturn.Variables.Add("cap_ToggleMenuActivationMessage", Resources.View_DynaContent_Cap_ToggleMenuActivationMessage);
            toReturn.Variables.Add("cap_ToggleMenuActivationOkButtonTitle", Resources.View_DynaContent_Cap_ToggleMenuActivationOkButtonTitle);
            toReturn.Variables.Add("cap_ToggleMenuActivationCancelButtonTitle", Resources.View_DynaContent_Cap_ToggleMenuActivationCancelButtonTitle);
            toReturn.Variables.Add("cap_ToggleMenuActivationNewStatus_Enabled", Resources.View_DynaContent_Cap_ToggleMenuActivationNewStatus_Enabled);
            toReturn.Variables.Add("cap_ToggleMenuActivationNewStatus_Disabled", Resources.View_DynaContent_Cap_ToggleMenuActivationNewStatus_Disabled);
            toReturn.Variables.Add("cap_CodeMirrorChanged_Title", Resources.View_DynaContent_Cap_CodeMirrorChanged_Title);
            toReturn.Variables.Add("cap_CodeMirrorChanged", Resources.View_DynaContent_Cap_CodeMirrorChanged);
            toReturn.Variables.Add("cap_CSSEditorPopUpTitle", Resources.View_DynaContent_Cap_CSSEditorPopUpTitle);
            toReturn.Variables.Add("cap_Ribbon_Tab01_Start", Resources.View_DynaContent_Cap_Ribbon_Tab01_Start);
            toReturn.Variables.Add("cap_Ribbon_Tab02_Insert", Resources.View_DynaContent_Cap_Ribbon_Tab02_Insert);
            toReturn.Variables.Add("cap_Ribbon_Tab03_Layout", Resources.View_DynaContent_Cap_Ribbon_Tab03_Layout);
            toReturn.Variables.Add("cap_Ribbon_Tab04_Code", Resources.View_DynaContent_Cap_Ribbon_Tab04_Code);
            toReturn.Variables.Add("cap_Ribbon_Tab05_Image", Resources.View_DynaContent_Cap_Ribbon_Tab05_Image);
            toReturn.Variables.Add("cap_Ribbon_Tab06_Table", Resources.View_DynaContent_Cap_Ribbon_Tab06_Table);
            toReturn.Variables.Add("cap_Ribbon_Tab07_Settings", Resources.View_DynaContent_cap_Ribbon_Tab07_Settings);
            toReturn.Variables.Add("cap_Ribbon_Layout01", Resources.View_DynaContent_Cap_Ribbon_Layout01);
            toReturn.Variables.Add("cap_Ribbon_Layout01_Title", Resources.View_DynaContent_Cap_Ribbon_Layout01_Title);
            toReturn.Variables.Add("cap_Ribbon_Layout02H", Resources.View_DynaContent_Cap_Ribbon_Layout02H);
            toReturn.Variables.Add("cap_Ribbon_Layout02H_Title", Resources.View_DynaContent_Cap_Ribbon_Layout02H_Title);
            toReturn.Variables.Add("cap_Ribbon_Layout02V", Resources.View_DynaContent_Cap_Ribbon_Layout02V);
            toReturn.Variables.Add("cap_Ribbon_Layout02V_Title", Resources.View_DynaContent_Cap_Ribbon_Layout02V_Title);
            toReturn.Variables.Add("cap_Ribbon_Layout031", Resources.View_DynaContent_Cap_Ribbon_Layout031);
            toReturn.Variables.Add("cap_Ribbon_Layout031_Title", Resources.View_DynaContent_Cap_Ribbon_Layout031_Title);
            toReturn.Variables.Add("cap_Ribbon_Layout032", Resources.View_DynaContent_Cap_Ribbon_Layout032);
            toReturn.Variables.Add("cap_Ribbon_Layout032_Title", Resources.View_DynaContent_Cap_Ribbon_Layout032_Title);
            toReturn.Variables.Add("cap_Ribbon_Layout041", Resources.View_DynaContent_Cap_Ribbon_Layout041);
            toReturn.Variables.Add("cap_Ribbon_Layout041_Title", Resources.View_DynaContent_Cap_Ribbon_Layout041_Title);
            toReturn.Variables.Add("cap_Ribbon_Layout042", Resources.View_DynaContent_Cap_Ribbon_Layout042);
            toReturn.Variables.Add("cap_Ribbon_Layout042_Title", Resources.View_DynaContent_Cap_Ribbon_Layout042_Title);
            toReturn.Variables.Add("cap_Ribbon_RemoveLayout", Resources.View_DynaContent_Cap_Ribbon_RemoveLayout);
            toReturn.Variables.Add("cap_Ribbon_RemoveLayout_Title", Resources.View_DynaContent_Cap_Ribbon_RemoveLayout_Title);
            toReturn.Variables.Add("cap_Ribbon_Save", Resources.View_DynaContent_Cap_Ribbon_Save);
            toReturn.Variables.Add("cap_Ribbon_Save_Title", Resources.View_DynaContent_Cap_Ribbon_Save_Title);
            toReturn.Variables.Add("cap_Ribbon_SourceCSS", Resources.View_DynaContent_Cap_Ribbon_SourceCSS);
            toReturn.Variables.Add("cap_Ribbon_SourceCSS_Title", Resources.View_DynaContent_Cap_Ribbon_SourceCSS_Title);
            toReturn.Variables.Add("cap_Ribbon_SourceHTML", Resources.View_DynaContent_Cap_Ribbon_SourceHTML);
            toReturn.Variables.Add("cap_Ribbon_SourceHTML_Title", Resources.View_DynaContent_Cap_Ribbon_SourceHTML_Title);
            toReturn.Variables.Add("cap_Ribbon_SourceJavascript", Resources.View_DynaContent_Cap_Ribbon_SourceJavascript);
            toReturn.Variables.Add("cap_Ribbon_SourceJavascript_Title", Resources.View_DynaContent_Cap_Ribbon_SourceJavascript_Title);
            toReturn.Variables.Add("cap_Ribbon_TogglePreview", Resources.View_DynaContent_Cap_Ribbon_TogglePreview);
            toReturn.Variables.Add("cap_Ribbon_TogglePreview_Title", Resources.View_DynaContent_Cap_Ribbon_TogglePreview_Title);

            toReturn.Variables.Add("cap_Ribbon_GeneralSettings", Resources.View_DynaContent_Cap_Ribbon_GeneralSettings);
            toReturn.Variables.Add("cap_Ribbon_GeneralSettings_Title", Resources.View_DynaContent_Cap_Ribbon_GeneralSettings_Title);

            toReturn.Variables.Add("cap_Ribbon_LayoutMenuTop", Resources.View_DynaContent_Cap_Ribbon_LayoutMenuTop);
            toReturn.Variables.Add("cap_Ribbon_LayoutMenuTop_Title", Resources.View_DynaContent_Cap_Ribbon_LayoutMenuTop_Title);
            toReturn.Variables.Add("cap_Ribbon_LayoutMenuLeft", Resources.View_DynaContent_Cap_Ribbon_LayoutMenuLeft);
            toReturn.Variables.Add("cap_Ribbon_LayoutMenuLeft_Title", Resources.View_DynaContent_Cap_Ribbon_LayoutMenuLeft_Title);
            toReturn.Variables.Add("cap_Ribbon_SiteLayout", Resources.View_DynaContent_Cap_Ribbon_SiteLayout);
            toReturn.Variables.Add("cap_Ribbon_SiteLayout_Title", Resources.View_DynaContent_Cap_Ribbon_SiteLayout_Title);
            
            toReturn.Variables.Add("cap_Ribbon_Roles", Resources.View_DynaContent_Cap_Ribbon_Roles);
            toReturn.Variables.Add("cap_Ribbon_Roles_Title", Resources.View_DynaContent_Cap_Ribbon_Roles_Title);
            toReturn.Variables.Add("cap_Ribbon_Users", Resources.View_DynaContent_Cap_Ribbon_Users);
            toReturn.Variables.Add("cap_Ribbon_Users_Title", Resources.View_DynaContent_Cap_Ribbon_Users_Title);
            toReturn.Variables.Add("cap_Ribbon_PlugIns", Resources.View_DynaContent_Cap_Ribbon_PlugIns);
            toReturn.Variables.Add("cap_Ribbon_PlugIns_Title", Resources.View_DynaContent_Cap_Ribbon_PlugIns_Title);

            toReturn.Variables.Add("cap_Settings_AdminUsers", Resources.View_DynaContent_Cap_Settings_AdminUsers);
            toReturn.Variables.Add("Ety_v_AdminUsers_Id", MetaDataResources.Ety_v_AdminUsers_UserId);
            toReturn.Variables.Add("Ety_v_AdminUsers_FavoriteLanguage", MetaDataResources.Ety_v_AdminUsers_FavoriteLanguage);
            toReturn.Variables.Add("Ety_v_AdminUsers_Username", MetaDataResources.Ety_v_AdminUsers_Username);
            toReturn.Variables.Add("Ety_v_AdminUsers_EMail", MetaDataResources.Ety_v_AdminUsers_Email);
            toReturn.Variables.Add("Ety_v_AdminUsers_IsApproved", MetaDataResources.Ety_v_AdminUsers_IsApproved);
            toReturn.Variables.Add("Ety_v_AdminUsers_IsOnline", MetaDataResources.Ety_v_AdminUsers_IsOnline);
            toReturn.Variables.Add("Ety_v_AdminUsers_IsLockedOut", MetaDataResources.Ety_v_AdminUsers_IsLockedOut);
            toReturn.Variables.Add("Ety_v_AdminUsers_Genre", MetaDataResources.Ety_v_AdminUsers_Genre);
            toReturn.Variables.Add("Ety_v_AdminUsers_FirstName", MetaDataResources.Ety_v_AdminUsers_FirstName);
            toReturn.Variables.Add("Ety_v_AdminUsers_LastName", MetaDataResources.Ety_v_AdminUsers_LastName);

            toReturn.Variables.Add("cap_Settings_AdminRoles", Resources.View_DynaContent_Cap_Settings_AdminRoles);
            toReturn.Variables.Add("Ety_v_AdminRoles_Id", MetaDataResources.Ety_v_AdminRoles_Id);
            toReturn.Variables.Add("Ety_v_AdminRoles_Name", MetaDataResources.Ety_v_AdminRoles_Name);

            toReturn.Variables.Add("cap_AdminUsers_GridCommand_Edit", Resources.View_DynaContent_Cap_AdminUsers_GridCommand_Edit);
            toReturn.Variables.Add("cap_AdminUsers_GridCommand_Delete", Resources.View_DynaContent_Cap_AdminUsers_GridCommand_Delete);
                        
            toReturn.Variables.Add("SiteLayout", PortalEnvironment.SiteLayout);

            toReturn.Variables.Add("cap_Settings_AdminUsers_EditFormTitle", Resources.View_DynaContent_Cap_Settings_AdminUsers_EditFormTitle);

            toReturn.Variables.Add("cap_Settings_AdminSettingsDialog_EditFormTitle", Resources.View_DynaContent_Cap_Settings_AdminSettingsDialog_EditFormTitle);

            List<string> langs = new List<string>();
            toReturn.Variables.Add("Languages", PortalEnvironment.Languages);
            return View(toReturn);
        }
    }
}